package com.org.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.org.bean.common.DangerInfo;
import com.org.dao.common.DangerInfoMapper;
import com.org.service.DangerService;

@Service("dangerService")
public class DangerServiceimpl implements DangerService {
	@Autowired
	private DangerInfoMapper dangerInfoMapper;

	@Override
	public List<DangerInfo> findAll() {
		// TODO Auto-generated method stub
		return dangerInfoMapper.findAll();
	}

	@Override
	public List<DangerInfo> findByName(String tunnelName,String disasterName) {
		// TODO Auto-generated method stub
		return dangerInfoMapper.findByName(tunnelName,disasterName);
	}

	@Override
	public boolean addDanger(DangerInfo dangerInfo) {
		// TODO Auto-generated method stub
		return dangerInfoMapper.addDanger(dangerInfo);
	}

	@Override
	public boolean deleteDanger(int dangerId) {
		// TODO Auto-generated method stub
		return dangerInfoMapper.deleteDanger(dangerId);
	}

	@Override
	public boolean updateDanger(DangerInfo dangerInfo) {
		// TODO Auto-generated method stub
		return dangerInfoMapper.updateDanger(dangerInfo);
	}

	@Override
	public void updateResult(DangerInfo dangerInfo) {
		// TODO Auto-generated method stub
		dangerInfoMapper.updateResult(dangerInfo);
	}

	@Override
	public List<DangerInfo> findResult(int dangerId) {
		// TODO Auto-generated method stub
		return dangerInfoMapper.findResult(dangerId);
	}

}
